//---------------------------------------------------------------------------------
#include "CCaisse.h"
//---------------------------------------------------------------------------------
static CCaisse *instance=0;
//---------------------------------------------------------------------------------
CCaisse* CCaisse::getInstance(void) {
	if(instance == 0) {
		instance=new CCaisse();
	}
	
	return instance;
}
//---------------------------------------------------------------------------------
void CCaisse::draw(QPainter *painter, int x, int y, int step) {
	if(ok) {
		painter->drawImage(QPoint(x, y), step < 10 ? imageOk1 : imageOk2);
	}else {
		painter->drawImage(QPoint(x, y), step < 10 ? image1 : image2);
	}
}
//---------------------------------------------------------------------------------
CCaisse::CCaisse(void) : CSprite() {
	image1=QImage(":qt-soko/images/caisse.png");
	image2=QImage(":qt-soko/images/caisse2.png");
	imageOk1=QImage(":qt-soko/images/caisseOk.png");
	imageOk2=QImage(":qt-soko/images/caisseOk2.png");
}
//---------------------------------------------------------------------------------